<%@ page language="java" pageEncoding="utf-8"
	contentType="text/html;charset=utf-8"%>
<%@ include file="/WEB-INF/views/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注册申请</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<style type="text/css">
	body, div, ul, li, p {
		margin: 0;
		padding: 0;
		border: 0;
		list-style: none;
		text-decoration: none;
		outline: none;
		font-size:14px;
	}
	#header {
		height:70px;
		border-bottom:1px solid #cccccc;
	}
	#footer {
		padding:10 0 20px 0;
		border-top:1px solid #cccccc;
	}
	#content, #footer {
		padding:10px;
		margin:0 auto;
		width:970px;
	}
	.inputtext {
		height:25px;
		font-size:16px;
		padding:1px;
	}
	.validatorerror {
		padding:1px;
		color:#ff0000;
	}
	</style>
	<script src="/resources/js/jquery.min.js" type="text/javascript"></script>
	<script src="/resources/js/jquery.validate.min.js" type="text/javascript"></script>
	<script type="text/javascript">
	$(document).ready(
		function(){
			/* 设置默认属性 */   
			$.validator.setDefaults({   
				submitHandler: function(form) { form.submit(); }   
			});

			var validator = $('#signinForm').validate({
				rules:{
					userId: {
						required:	true,
						email:		true
					},
					passwd: {
						required:	true,
						minlength:	6
					},
					verifyCode:		"required"
				}, 
				
				messages: {
					userId: {
						required:	"电子邮件必须输入",
						email:		"请输入有效的电子邮件地址"
					},
					passwd: {
						required:	"密码必须输入",
						minlength:	"密码长度为 6-64 位"
					},
					verifyCode:		"验证码必须输入"
				},
				
				errorPlacement: function(error, element) {
					error.appendTo(element.parent());
					error.addClass('validatorerror');
				},
				
				success: function(label) {   
					label.html("&nbsp;").addClass("checked");
				},
				
				onkeyup: false
			});
			
			validator.showErrors({
				<c:forEach items="${requestScope['org.springframework.validation.BindingResult.employee'].fieldErrors}" var="fielderror">
				//"${fielderror.field}":"<fmt:message key="${fielderror.defaultMessage}" />",
				"${fielderror.field}":"${fielderror.defaultMessage}",
				</c:forEach>
				"":""
			});
		}
	);
	</script>
</head>
<body>
<div id="header">ss</div>
<div id="content">
<div style="float: right; width: 360px;"> 说明: </div>
<div style="margin-right: 370px;">
	<form name="signinForm" id="signinForm" action="" method="post">

	<div style="padding:5px;">* 电子邮件 （管理账号）</div>
	<div><input type="text" name="userId" id="userId" value="<c:out value="${employee.userId}" />"  class="inputtext" maxlength="128"/></div>
	
	<div style="padding:5px;">* 密码</div>
	<div><input type="password" name="passwd" id="passwd" value="" class="inputtext" maxlength="64"/></div>
	
	<div style="padding:5px;">* 验证码</div>
	<div><input type="text" name="verifyCode" id="verifyCode" value="" class="inputtext" /> <img src="/verification" align="absmiddle"/></div>
	
	<div>
	<input type="submit" name="" value=" 登录 "/>
	</div>
	
	</form>
</div>
</div>
<div id="footer">ssss</div>
</body>
</html>